;
(function() {
	var role = require("./role");
	var BusCon = require("../../core/bus/_con");
	var UserCon = require("../../core/user/_con");
	var GoodsCon = require("../../core/goods/_con");
	var AchCon = require("../../core/ach/_con");
	var db = require("../../core/db/index");
	var config = require("../../core/_include/config");
	var ResponObj = require("../_include/responObj");
	var BusGuideCon = require("../../core/bus.guide/_con");
	module.exports = {
		prefix: "/user/guide",
		get: {
			"/": function() {
				var user = role.getUser(this);
				var result = user.getGuideBusList();
				this.body = ResponObj("json", result);
			}
		},
		put: {
			"/state/weishenqingduihuan_to_shenqingduihuanzhong": function() {
				var user = role.getUser(this);
				var bus_id = this.request.body.bus_id;
				if (!bus_id) {
					throwCusError("参数错误")
				}
				var guide = user.state_guide_weishenqingduihuan_to_shenqingduihuanzhong(bus_id);
				this.body = ResponObj("json", guide);
			},
			"/state/shangjiayijingfukuan_to_yonghuquerenfukuan": function() {
				var user = role.getUser(this);
				var bus_id = this.request.body.bus_id;
				if (!bus_id) {
					throwCusError("参数错误")
				}
				var guide = user.state_guide_shangjiayijingfukuan_to_yonghuquerenfukuan(bus_id);
				this.body = ResponObj("json", guide);
			}
		}
	}
}());